Slides the digital output master volume and/or the CD volume from the current level to the target level.
BOOL WINAPI BASS_SlideVolume( |
Parameters
volume | The target volume... 0 (min) - 100 (max). | ||||
period | Delay in milliseconds between each volume inc/decrement. The total time taken by a volume slide is calculated by delta volume * period . | ||||
mode | Digital and/or CD volume flags.
|
Return value
If succesful, then TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.
Error codes
BASS_ERROR_INIT | BASS_Init has not been successfully called. |
BASS_ERROR_CDINIT | BASS_CDInit has not been successfully called. |
BASS_ERROR_CDVOL | BASS could not find a volume control for the CD. |
Remarks
The volume level sliding is done in the background, so your program can still do other things (eg. playing sounds) while the levels are sliding. Use BASS_IsSliding to check if the volume levels are still sliding after calling BASS_SlideVolume.
Example
A one second fade-in of the digital master volume, from silent to the maximum level.
BASS_SetVolume(0); // silence the digital master volume |
See also
BASS_IsSliding